import { apiGetDicData } from '@/services/dic';
import { history } from '@umijs/max';
import { action, makeObservable, observable, runInAction } from 'mobx';

class Dic {
  @observable dicData: any | null = null;

  constructor() {
    makeObservable(this);
  }

  init = async () => {
    if (!this.dicData) {
      return;
    }
    const dicRes = await apiGetDicData({});
    this.dicData = dicRes.data;
  };
}

export const MDic = new Dic();
